open Fr
open FrGui_common

let every s =
	let ms = int_of_float (s *. 1000.) in
	event_source
		(fun r -> GMain.Timeout.add ms
			(fun () -> send_event r s; true))
		GMain.Timeout.remove

let timer s =
	collect_b (+.) 0. (every s)
